"""
c = 1  #记录循环次数的变量
while c<=10:#判断循环次数
    print(c,"你好")#运行循环的内容
    c = c + 1 #改变循环的变量
"""
"""
#输出1-100 17的倍数
c = 1
while c<=100:
    if c%17==0:
        print(c)
    c = c + 1
"""

"""
#输出1-100的数的和
a=1
b=0
while a<=100:
    b=b+a  #累加逻辑
    a=a+1
print(b)
"""

"""
#输出1-2+3-4+...-100的结果
a = 1
b = 0
while a<=100:
    if a%2==0:
        b = b - a
    elif a % 2==1:
        b = a + b
    a = a + 1
print(b)
"""

#计算1-3+5-7+9-...99=

"""#自己的方法
a = 1
b = 1
c = 0
while a<=99:
    if b%2==1:
        c = c + a
    else:
        c = c - a
    a = a + 2
    b = b + 1
print(c)
"""
"""               #乘法思维
#1-3+5-7...99=?
a=1
b = 0
fu = 1
while a<=99:
    if a % 2 == 1:
        b = b + a * fu
        fu = -fu
    a = a + 1
print(b)
"""









